package com.swu.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.swu.common.Result;
import com.swu.dto.DiseaseDictionaryQueryDTO;
import com.swu.po.DiseaseDictionary;
import com.swu.service.DiseaseDictionaryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@Tag(name = "疾病字典管理")
@RestController
@RequestMapping("/disease-dictionary")
@RequiredArgsConstructor
public class DiseaseDictionaryController {
    
    private final DiseaseDictionaryService diseaseDictionaryService;

    @Operation(summary = "分页查询疾病字典数据")
    @PostMapping("/page")
    public Result<Page<DiseaseDictionary>> page(@RequestBody DiseaseDictionaryQueryDTO queryDTO) {
        Page<DiseaseDictionary> page = diseaseDictionaryService.pageQuery(queryDTO);
        return Result.success(page);
    }
} 